package com.example.testappwidget.utils

import java.text.SimpleDateFormat
import java.util.Date

/**
 *Author: chinadragon
 *Time: 2024/4/7
 */
object StringUitl {
    fun timeStamp2DateYMDHMS(date: Long?): String? {
        if (date == null) {
            return ""
        }
        val pattern = "yyyy-MM-dd HH:mm:ss"
        val sdf = SimpleDateFormat(pattern)
        return sdf.format(Date(date))
    }
}